<template>
   <div class="child">
       {{fullMessage}}
   </div> 
</template>
<script lang="ts">
import Vue from 'vue';
import {Component, Prop} from 'vue-property-decorator';

 @Component({})
export default class child extends Vue {
  message: string = '我是子类';
  // 接收来自父类的值
  @Prop({ type: String, default: ''})
  msg;

  get fullMessage() { //computed计算属性
    return `${this.message},${this.msg}`;
  }
}
</script>
<style lang="sass" scoped>

</style>


